﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Diagnostics.Contracts;

namespace Fdd.Aspen.DomainModel.Repositories.Interfaces
{
    public interface IRepository<T> where T : class
    {
        IQueryable<T> GetQuery();
        
        IEnumerable<T> GetAll();

        IEnumerable<T> Find(Expression<Func<T, bool>> where);
        
        T Single(Expression<Func<T, bool>> where);
        
        void Delete(T entity);
        
        void Add(T entity);
    }
}
